const mixin = {
    data() {
        return {
            tableData: [],
            tableData1: [{
                date: '2016-05-02',
                name: '王小虎',
                address: '上海市普陀区金沙江路 1518 弄'
            }, {
                date: '2016-05-04',
                name: '王小虎',
                address: '上海市普陀区金沙江路 1517 弄'
            }, {
                date: '2016-05-01',
                name: '王小虎',
                address: '上海市普陀区金沙江路 1519 弄'
            }, {
                date: '2016-05-03',
                name: '王小虎',
                address: '上海市普陀区金沙江路 1516 弄'
            }],
            tableData2: [{
                date: '2016-05-02',
                name: '李小苗',
                address: '上海市普陀区金沙江路 1518 弄'
            }, {
                date: '2016-05-04',
                name: '李小苗',
                address: '上海市普陀区金沙江路 1517 弄'
            }, {
                date: '2016-05-01',
                name: '李小苗',
                address: '上海市普陀区金沙江路 1519 弄'
            }, {
                date: '2016-05-03',
                name: '李小苗',
                address: '上海市普陀区金沙江路 1516 弄'
            }],
            tableData3: [{
                date: '2016-05-02',
                name: '张小跑',
                address: '上海市普陀区金沙江路 1518 弄'
            }, {
                date: '2016-05-04',
                name: '张小跑',
                address: '上海市普陀区金沙江路 1517 弄'
            }, {
                date: '2016-05-01',
                name: '张小跑',
                address: '上海市普陀区金沙江路 1519 弄'
            }, {
                date: '2016-05-03',
                name: '张小跑',
                address: '上海市普陀区金沙江路 1516 弄'
            }],
            tableData5: [{
                date: '2016-05-02',
                name: '郭果',
                address: '上海市普陀区金沙江路 1518 弄'
            }, {
                date: '2016-05-04',
                name: '郭果',
                address: '上海市普陀区金沙江路 1517 弄'
            }, {
                date: '2016-05-01',
                name: '郭果',
                address: '上海市普陀区金沙江路 1519 弄'
            }, {
                date: '2016-05-03',
                name: '郭果',
                address: '上海市普陀区金沙江路 1516 弄'
            }],
            tableData4: [{
                date: '2016-05-02',
                name: '周小军',
                address: '上海市普陀区金沙江路 1518 弄'
            }, {
                date: '2016-05-04',
                name: '周小军',
                address: '上海市普陀区金沙江路 1517 弄'
            }, {
                date: '2016-05-01',
                name: '周小军',
                address: '上海市普陀区金沙江路 1519 弄'
            }, {
                date: '2016-05-03',
                name: '周小军',
                address: '上海市普陀区金沙江路 1516 弄'
            }]
        }
    },
    methods: {
        change(val) {
            switch (val) {
                case 1:
                    this.tableData = this.tableData1
                    break;
                case 2:
                    this.tableData = this.tableData2
                    break;
                case 3:
                    this.tableData = this.tableData3
                    break;
                case 4:
                    this.tableData = this.tableData4
                    break;
                case 5:
                    this.tableData = this.tableData5
                    break;

            }
        }
    },
    created() {
        this.tableData = this.tableData1
    }
}
export default mixin;